package com.suixinsanren.design.proxy.demo.demo04;

public class DuckProxy implements Duck {

    private final Duck duck;
    public static int quackCounter = 0;
    public static int flyCounter = 0;

    public DuckProxy(Duck duck) {
        this.duck = duck;
    }

    @Override
    public void quack() {
        duck.quack();
        quackCounter++;
    }

    @Override
    public void fly() {
        duck.fly();
        flyCounter++;
    }
}
